sap.ui.core.UIComponent.extend("sap.lx.nba.Component", {

    metadata: {
        name: "La Chapelle launchpad Application",
        version: "1.0.0",
        dependencies: {
            libs: [],
            components: []
        },
        config: {},
        routing: {
            routes: [
                {
                    name: "man",
                    pattern: "man",
                    view: "show",
                    viewType: sap.ui.core.mvc.ViewType.XML,
                    viewPath: "sap.lx.nba.man",
                    clearTarget: true,
                    targetControl: "app",
                    targetAggregation: "pages",
                    id: "man"
                }, {
                    name: "match",
                    pattern: "match",
                    view: "show",
                    viewType: sap.ui.core.mvc.ViewType.XML,
                    viewPath: "sap.lx.nba.match",
                    clearTarget: true,
                    targetControl: "app",
                    targetAggregation: "pages",
                    id: "match"
                }, {
                    name: "range",
                    pattern: "range",
                    view: "show",
                    viewType: sap.ui.core.mvc.ViewType.XML,
                    viewPath: "sap.lx.nba.range",
                    clearTarget: true,
                    targetControl: "app",
                    targetAggregation: "pages",
                    id: "range"
                }, {
                    name: "team",
                    pattern: "team",
                    view: "show",
                    viewType: sap.ui.core.mvc.ViewType.XML,
                    viewPath: "sap.lx.nba.team",
                    clearTarget: true,
                    targetControl: "app",
                    targetAggregation: "pages",
                    id: "team"
                }, {
                    name: "manedit",
                    pattern: "manedit/{Id}",
                    view: "edit",
                    viewType: sap.ui.core.mvc.ViewType.XML,
                    viewPath: "sap.lx.nba.man",
                    clearTarget: true,
                    targetControl: "app",
                    targetAggregation: "pages",
                    id: "manedit"
                },
                {
                    name: "user",
                    pattern: "user",
                    view: "show",
                    viewType: sap.ui.core.mvc.ViewType.XML,
                    viewPath: "sap.lx.nba.user",
                    clearTarget: true,
                    targetControl: "app",
                    targetAggregation: "pages",
                    id: "user"
                }
            ]
        }
    },

    init: function() {

        sap.ui.core.UIComponent.prototype.init.apply(this, arguments);

        var router = this.getRouter();

        router.initialize();

    },

    createContent: function() {

        var app = new sap.m.App("app");

        var shell = new sap.m.Shell({
            showLogout: false,
            appWidthLimited: true,
            app: app
        });

        return shell;

    }

});
